I. Field
The present invention relates generally to electronics, and more specifically to a graphics engine.
II. Background
Graphics processors are widely used to render 2-dimensional (2-D) and 3-dimensional (3-D) images for presentation on electronics displays. A 3-D image may be modeled with surfaces, and each surface may be approximated with triangles. The number of triangles needed to represent the 3-D image is dependent on the complexity of the surfaces and the desired resolution for the image. The total number of triangles for the 3-D image may be quite large, e.g., in the millions.
A graphics processor attempts to render the triangles for 3-D images as quickly as possible. Each triangle is defined by (x, y) coordinates for the three vertices of the triangle. Each vertex of each triangle is associated with various attributes such as color, texture, depth, and so on. The graphics processor renders each triangle by interpolating each of the attributes for that triangle. For each attribute of each triangle, the graphics processor determines a proper value for that attribute at each pixel location within the triangle. The graphics processor typically achieves this by performing linear interpolation using the values given for the attribute at the three vertices of the triangle. Since a 3-D image may include many triangles and since each triangle may have many attributes, the rendering process is typically very computationally intensive.
There is therefore a need in the art for a graphics engine that can efficiently perform interpolation for graphics rendering.